import { createRouter, RouteRecordRaw, createWebHashHistory } from "vue-router";

import Index from "@/views/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Index",
    component: Index,
  },
  {
    path: "/todo",
    name: "Todo",
    component: () => import("@/views/todo.vue"),
  },
  // {
  //   path: "/goods",
  //   // redirect: '/goods/goodsList',
  //   name: "goods",
  //   meta: { title: "商品管理", icon: "el-icon-s-shop" },
  //   // component: () => import('../views/goods/goodsList.vue')
  //   children: [
  //     {
  //       path: "goodsList",
  //       name: "goodsList",
  //       component: () => import("@/views/goods/goodsList.vue"),
  //       meta: { title: "商品列表", path: "/goods/goodsList" },
  //     },
  //   ],
  // },
];

const router = createRouter({
  history: createWebHashHistory(), // createMemoryHistory
  routes,
});
export default router;
